package com.systar.activity.report.actions;

public enum ActionType
{
	/** get monitoring data*/
	get		(new GetHtmlData()),
	/** Raise error in a specified source*/
	raise	(new RaiseErrors()), 
	/** Cooldown error in a specified source*/
	cool	(new CooldownErrors()),
	/** push data in a specified source*/
	push	(new PushData()),
	;
	
	private ActionProcessor processor;
	
	private ActionType(ActionProcessor processor)
	{
		this.processor = processor;
	}
	
	public ActionProcessor getProcessor()
	{
		return processor;
	}
	
	public static ActionType fromString(String actionName)
	{
		if (actionName == null)
			return null;
		for (ActionType param : ActionType.values())
		{
			if (param.name().compareToIgnoreCase(actionName) == 0)
				return param;
		}
		return null;
	}
	
}
